public class Mycont{
  public list<Contact> getMyContacts(){
       return [SELECT  Name, Account.name from Contact];
       }
  }